package org.s45.erp.api;


import org.s45.erp.common.pojo.entities.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;

@FeignClient(contextId = "remoteUserService",
        name = "jshERP-boot",
        path = "/jshERP-boot/api/user")
public interface RemoteUserService {

    @GetMapping("/getUserId")
    public Long getUserId(HttpServletRequest request);

    @GetMapping("/getCurrentUser")
    public User getCurrentUser();

    @GetMapping("/{id}")
    public User getUser(@PathVariable("id") Long id);
}
